<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <style>
    body {
      width: 100%;
      height: 100vm;
      display: flex;
      justify-content: center;
      align-items: center;
    }
    main {
      width: 200px;
      height: 200px;
      /* background-color: red; */
    }

    main>section>div{
      &::before ,&::after{
        content: "2";
        color: white;
        background-color: black;
        width: 100%;
        height: 50%;
        font:bold 200px Arial;
        color:white;
        text-align: center;
        overflow: hidden;
    }
  </style>
  <body>
    <main>
      <section>
        <div data-before="3" data-after="4"></div>
      </section>
    </main>
  </body>
</html>
